﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SlimDX.Direct3D9;
using SlimDX;

namespace LibRadiant.Main
{
    //LightManager : 
    //提供固定管線SetLight/EnableLight等等服務
    //提供可程式化管線場景光源資訊索引
    internal class LightManager
    {
        public LightManager(D3D9Core inContext)
        {
            
        }

        //List<Light> mLightList;

        //最多同時模擬的光源數
        uint mMaxLightSimulate;
        public uint MaxLightSimulate
        {
            get { return mMaxLightSimulate; }
            set { mMaxLightSimulate = value; }
        }

        Light mMainEnviromentLight = new Light();
        public Light EnviromentLight
        {
            get {
                if (mMainEnviromentLight == null)
                    mMainEnviromentLight = CreateDefaultEnviromentLight();

                return mMainEnviromentLight; }

            set { 
                mMainEnviromentLight = value; 
            }
        }
        Light CreateDefaultEnviromentLight()
        {
            Light x = new Light(); 
            x.Direction = new Vector3(0, 1, 0); 
            x.Diffuse = new Color4(0.4f, 0.4f, 0.4f); 
            x.Ambient = new Color4(0.15f, 0.15f, 0.15f);
            return x;
        }





        #region exposed methods
        #endregion exposed methods


    }
}
